<include file="Public:head"/>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>系统设置</h5>
        </div>
        <div class="ibox-content">
            <form action="{:url('Set/index')}" method="post" enctype="multipart/form-data" id="brandForm" class="form-horizontal">
                <input type="hidden" name="id" value="{$config.id?$config.id:''}">
                <div class="form-group">
                    <label class="col-sm-2 control-label">提现费率（%）</label>

                    <div class="col-sm-6">
                        <input type="number" class="form-control" value="{$config.poundage?$config.poundage:'';}" name="poundage" placeholder="" min="0">
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <!--<div class="form-group">-->
                    <!--<label class="col-sm-2 control-label">内容</label>-->
                    <!--<div class="col-sm-10">-->
                        <!--<script type="text/plain" id="editor" name="describe" style="width:80%;height:250px;"></script>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="hr-line-dashed"></div>-->
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <a href="JavaScript:void(0);" onclick="Submit();" class="btn btn-primary" id="submit">提交</a>
                        <!--<button class="btn btn-white" type="submit">取消</button>-->
                        <!--<input type="button" class="btn btn-primary" value="提交"/>-->
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!-- End Panel Basic -->
</div>
<script>
    function Submit(){
        var poundage = $('input[name="poundage"]').val();
        var id = $('input[name="id"]').val();

        $.post("{:url('Set/index')}",{
            id:id,poundage:poundage
        },function(result){
            if(result.code == '0'){
                parent.layer.msg(result.msg,{
                    shade:false,
                    icon:2,
                });
            }else{
                parent.layer.msg(result.msg,{
                            icon:1,
                            time:1000,
                        },
                        function (index, item) {
                            location.href = result.url;
                        });
            }
        });

    };
</script>

<!--<script type="text/javascript">-->

    <!--//实例化编辑器-->
    <!--//建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例-->
    <!--var ue = UE.getEditor('editor');-->

<!--</script>-->

</body>

</html>